import os
import configparser

config_path = os.path.join(os.path.dirname(__name__),'..','conf','conf.ini')
class ConfigUtils:
    def __init__(self,conf_file=config_path):
        self.conf_obj=configparser.ConfigParser()
        self.conf_obj.read(conf_file,encoding='utf-8')
    @property
    def Host(self):
        host_value=self.conf_obj.get('default','HOST')
        return host_value
    @property
    def Server(self):
        server=self.conf_obj.get('email','EMAIL_SERVER')
        return server
    @property
    def Sender(self):
        sender=self.conf_obj.get('email','SENDER')
        return sender
    @property
    def Resiver(self):
        resiver=self.conf_obj.get('email','RESIVER')
        return resiver
    @property
    def Password(self):
        password=self.conf_obj.get('email','PASSWORD')
        return password
    @property
    def CC(self):
        cc=self.conf_obj.get('email','CC')
        return cc
    @property
    def Subject(self):
        subject=self.conf_obj.get('email','SUBJECT')
        return subject
config = ConfigUtils()

# if __name__ == '__main__':
#     print(config.Host,type(config.Host))
